:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --light: #f8f9fa;
    --success: #2ecc71;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
}

/* 侧边导航 */
.sidebar {
    width: 250px;
    background: var(--primary);
    color: white;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.logo h1 {
    font-size: 22px;
    display: flex;
    align-items: center;
}

.logo-icon {
    font-size: 28px;
    margin-right: 10px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin: 5px 15px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部栏 */
.topbar {
    background: white;
    padding: 0 25px;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 90;
}

.user-menu {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    margin-right: 12px;
}

.user-info {
    margin-right: 20px;
}

.user-name {
    font-weight: 500;
}

.user-role {
    font-size: 13px;
    color: #7f8c8d;
}

/* 内容卡片 */
.content-container {
    flex: 1;
    padding: 25px;
    background: #f0f3f7;
}

.content-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 30px;
    min-height: 500px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    border-top: 1px solid #eee;
    background: white;
}

/* AJAX内容加载动画 */
.loading {
    text-align: center;
    padding: 50px 0;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--secondary);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 用户头像悬停效果 */
.user-avatar {
    cursor: pointer;
    transition: transform 0.4s;
}

.user-avatar:hover {
    transform: scale(1.05);
}

#userDropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 120px;
    z-index: 1000;
    display: none;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

#userDropdown a {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.2s;
}

#userDropdown a:hover {
    background: #f8f9fa;
    color: #3498db;
}
/* 添加到main.jsp的style部分 */
.page-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.search-form {
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.action-buttons .btn {
    margin-right: 5px;
}